<!DOCTYPE HTML>
<html>

<head>
      <title> 新增新品推荐</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <link href="../../../assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/bui-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/page-min.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/jx-style.css" rel="stylesheet" type="text/css" />
      <link href="../../../assets/css/prettify.css" rel="stylesheet" type="text/css" />
</head>

<body>
      <div class="container">
            <div class="detail-page span24">
                  <div class="detail-page-title">
                        <h4>新增新品推荐

                              <a class="page-action pull-right jx-btn" data-type="close" href="javascript:;">返回</a>

                        </h4>
                  </div>
                  <div class="detail-section" style="margin-top:50px">
                        <form id="J_Form" class="jx-form form-horizontal jx-form-thin">
                              <div class="row">
                                    <div class="control-group span12 offset6">
                                          <label class="control-label">排   序：</label>
                                          <div class="controls">
                                                <input type="text" class="control-text" name="sort" data-rules="{required:true,number:true}">
                                          </div>
                                    </div>
                              </div>
                              <div class="row">
                                    <div class="control-group span12 offset6  control-row6">
                                          <label for="" class="control-label has-note"> 新品图片: <div class="label-note"> 图标尺寸:<br>  px*px     </div> </label>
                                          <div class="controls">
                                                <input id="upload-img" type="file" class="hide">
                                                <a href="#" class="btn-upload">
                                                <span>上传图片</span>
                                                <img src="" width="98" height="98">
                                                <input name="b" type="text" data-rules="{required:true}" value="" style="display: none">
                                           </a>
                                          </div>
                                    </div>
                              </div>
                              <div class="row">
                                    <div class="control-group span12 offset6">
                                          <label class="control-label">新品名称：</label>
                                          <div class="controls">
                                                <input type="text" class="input-large control-text" name="name" data-rules="{required:true}">
                                          </div>
                                    </div>
                              </div>
                              <div class="row">
                                    <div class="control-group span12 offset6">
                                          <label class="control-label">新品价格：</label>
                                          <div class="controls">
                                                <input type="text" class=" control-text" name="price" data-rules="{required:true,number:true}">
                                          </div>
                                    </div>
                              </div>
                              <div class="row">
                                    <div class="control-group span12 offset6">
                                          <label class="control-label">新品标签：</label>
                                          <div class="controls">
                                                <input type="text" class=" control-text" name="tag" data-rules="{required:true,number:true}">
                                          </div>
                                    </div>
                              </div>
                              <div class="row">
                                    <div class="control-group span12 offset6">
                                          <label class="control-label">商品货号：</label>
                                          <div class="controls search-new-pro">
                                                <i class="icon icon-search"></i> <input type="text" id="new-pro-id" class=" control-text"
                                                      name="id">

                                          </div>
                                    </div>
                              </div>
                              <div class="row">
                                    <div class="control-group span12 offset6" id="new-pro">

                                    </div>
                              </div>

                              <div class="actions-bar">
                                    <div class="row">
                                          <div class="span12 offset10 ">
                                                <button type="submit" class="button button-primary">确定</button>
                                                <button type="reset" class="button">重置</button>
                                          </div>
                                    </div>
                              </div>
                        </form>
                  </div>

            </div>
      </div>
      <!-- script end -->
      </div>
      <script type="text/javascript" src="../../../assets/js/jquery-1.8.1.min.js"></script>
      <script type="text/javascript" src="../../../assets/js/bootstrap.js"></script>
      <script type="text/javascript" src="../../../assets/js/bui-min.js"></script>
      <script type="text/javascript" src="../../../assets/js/config-min.js"></script>
      <script type="text/javascript" src="../../../assets/js/admin.js"></script>

      <script type="text/javascript">
            BUI.use('common/page');
      </script>
      <script type="text/javascript">
            var ue = UE.getEditor('editor');
      </script>
      <script type="text/javascript">
            BUI.use(['bui/overlay', 'bui/form'], function (Overlay, Form) {

                  var form = new Form.Form({
                        srcNode: '#J_Form'
                  });
                  form.render();


                  var dialog = new Overlay.Dialog({
                        title: '搜索商品',
                        width: 600,
                        height: 250,
                        bodyContent: ' <table style="width:550px" cellspacing="0" class="center jx-table table-bordered">' +
                              '<thead><tr><th>商品货号</th> <th>商品图片</th> <th>商品名称</th> <th>品牌</th> </tr></thead>' +
                              '<tbody>' +
                              '<tr>' +
                              '<td>844092</td>' +
                              '<td><img width="150px" src="../../../assets/img/u9486.png"></td>' +
                              '<td>W NIKE ROSHE ONE</td>' +
                              '<td>Nike</td>' +
                              '</tr>' +
                              '</tbody>' +
                              '</table>',
                        success: function () {
                              //table
                              $("#new-pro").append(this.__attrVals.bodyContent)
                              this.close();
                        }
                  });

                  $('.icon-search').on('click', function () {
                        var idStr = $("#new-pro-id").val().trim().toLowerCase();
                        if (idStr == "") {
                              BUI.Message.Alert('请输入货号', function () {}, 'info')
                        } else {
                              //ajax请求成功
                              dialog.show();
                        }
                  });



            });
      </script>

      <body>

</html>